-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflect an user's primary_email_address
update on its contact_info
list
#6585
Conversation
@nicholaspcr: Please add the testing procedure. |
3fb5f93
to
b956d4a
Compare
With the new changes done this should not longer be the case so I'm removing the text from the note for reviewers. |
b956d4a
to
38ae9d4
Compare
38ae9d4
to
b0e5e0f
Compare
b0e5e0f
to
884b4cd
Compare
Summary
Didn't create a issue for it but its linked to the list of behaviors noted while going through some of the
contact_info
changes.References the discussion in #6515 (comment)
Changes in the interactions between the update of an user
primary_email_address
and itscontact_info
list.There are a few areas of which the intended behavior was not happening:
contact_info
list when an user performs a request to change itsprimary_email_address
.primary_email_address
, it does not set theprimary_email_address_validated_at
tonil
. It also does not send a email re-requesting its validation.Changes
primary_email_address_validated_at
field mask when the update request is made by a non adminprimary_email_address
and its value present in thecontact_info
list.Testing
Unit tests and manual tests.
Test steps
Run the Stack with the following configuration:
Non admin:
ttn-lw-cli usr create <usr_id> --primary-email-address <email> --password <password>
dir
on the config)tools/bin/mage dev:dbsql
3.1. Run
select primary_email_address, primary_email_address_validated_at from users;
3.2. User with <usr_id> should be validated
3.3. Run
select * from contact_infos;
3.4. Contact info with value should be validated.
<base_url>/oauth/profile-settings
and update theEmail Address
5.1. Should receive a warning of restricted rights.
tools/bin/mage dev:dbsql
7.1. Run
select primary_email_address, primary_email_address_validated_at from users;
7.2. User with <usr_id> should be not be validated (validated_at being empty)
7.3. Run
select * from contact_infos;
7.4. Contact info with value should not be validated. (validated_at being empty)
Admin:
ttn-lw-cli usr create <usr_id> --primary-email-address <email> --password <password> --admin
dir
on the config)tools/bin/mage dev:dbsql
3.1. Run
select primary_email_address, primary_email_address_validated_at from users;
3.2. User with <usr_id> should be validated
3.3. Run
select * from contact_infos;
3.4. Contact info with value should be validated.
<base_url>/oauth/profile-settings
and update theEmail Address
tools/bin/mage dev:dbsql
6.1. Run
select primary_email_address, primary_email_address_validated_at from users;
6.2. User with <usr_id> should be be validated
6.3. Run
select * from contact_infos;
6.4. Contact info with value should be validated.
Regressions
Ever since 65edcaf when an user who updates its
primary_email_address
the operation is not reflected on thecontact_info
list. Therefore there is a disconnect between the primary email and the values present in thecontact_info
. The field has been deprecated, the primary email is what is used to send emails and we removed references to thecontact_info
field, being only kept for consistency.Therefore I believe that this change is merely superficial and done in order to have the behavior as expected until the next
major/bump
and we can remove thecontact_info
field.Notes for Reviewers
Checklist
README.md
for the chosen target branch.CHANGELOG.md
.CONTRIBUTING.md
, there are no fixup commits left.